import Vue from 'vue'
import VueRouter from 'vue-router'
import '../public-path.js'
import Layout from '@/layout/home-page/index.vue'

Vue.use(VueRouter)

const routes = [
    {
        path: '',
        component: Layout,
        children: [
            // 高后果区
            {
                path: '/',
                name: 'hcas',
                component: () => import('@/views/index.vue'),
                redirect: '/aiModel',
                children: [
                    {
                        path: '/aiModel',
                        name: 'aiModel',
                        component: () =>
                            import('@/views/aiModel/index.vue'),
                        meta: {
                            title: '智慧管网AI问答'
                        }
                    },
                ]
            }
        ]
    },
]

const router = new VueRouter({
    // base: process.env.BASE_URL,
    // base: window.__POWERED_BY_QIANKUN__ ? '/hcas' : process.env.BASE_URL,
    // mode: 'history',
    routes
})
export default router
